<template>
  <textarea v-model="model" :cols="option.cols || '50'" :rows="option.rows || '5'" :maxlength="option.maxlength || '500'" :placeholder="option.placeholder || '请输入'" style="padding: 10px; border-radius: 5px;" />
  </template>
<script>
export default {
  name: "iv-textarea",
  props: {
    value: {
      type: String,
      default: ""
    },
    option: {
      type: Object,
      default: () => {}
    }
  },
  computed: {
    model: {
      get() {
        return this.value;
      },
      set(val) {
        this.$emit("update:value", val);
      }
    }
  }
};
</script>
